package com.baizhi;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("t_phone")
public class Phone {
    @TableId(type = IdType.AUTO)
    private int id;
    private String name;
    private double price;
    private int state;
    private int brandId;
    @TableField(exist = false)
    private Brand brand;

    @Override
    public String toString() {
        return "Phone{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", state=" + state +
                ", brandId=" + brandId +
                ", brand=" + brand +
                '}';
    }

    public Phone(int id, String name, double price, int state, int brandId, Brand brand) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.state = state;
        this.brandId = brandId;
        this.brand = brand;
    }

    public Phone() {
    }

    public Phone(int id, String name, double price, int state, int brandId) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.state = state;
        this.brandId = brandId;
    }

    public Brand getBrand() {
        return brand;
    }

    public void setBrand(Brand brand) {
        this.brand = brand;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getBrandId() {
        return brandId;
    }

    public void setBrandId(int brandId) {
        this.brandId = brandId;
    }
}
